﻿using System.Web.Mvc;
using Abp.Web.Mvc.Authorization;
using Abp.Runtime.Session;
using Microsoft.AspNet.Identity;
using Abp.Domain.Uow;
using WanFang.Sessions;
using WanFang.Authorization.Users;
using System.Threading.Tasks;

namespace WanFang.Web.Controllers
{
    [AbpMvcAuthorize]
    public class HomeController : WanFangControllerBase
    {
        private readonly UserManager _userManager;

        public HomeController(
            UserManager userManager,
            ISessionAppService sessionAppService)
        {
            _userManager = userManager;
        }
        public async Task<ActionResult> Index()
        {

            var user = await _userManager.GetUserByIdAsync(AbpSession.UserId.Value);
            return View(user);
        }
	}
}